<template>
  <div class="f-loading__mask" v-show="show">
    <div class='mb-20px f-loading__icon'></div>
    <p>加载中 . . .</p>
  </div>
</template>

<script setup lang="ts">
const props = defineProps({
  show: {
    type: Boolean,
    default: false
  }
})
</script>

<style lang="less" scoped>
.f-loading {
  &__mask {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1011;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
    opacity: 0.7;
    color: rgb(25, 137, 250);
  }

  &__icon {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid rgb(25, 137, 250);
    // border-color: #00ffff #00ccff #0099ff #0066ff;
    width: 30px;
    height: 30px;
    /* animation-name:load; */
    animation: load 2s linear infinite;
  }

  @keyframes load {
    0% {
      transform: rotate(0deg);
    }

    100% {
      transform: rotate(360deg);
    }
  }
}
</style>
